<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>



    <script>
        let num = Number(prompt("请输入鸡蛋的数量"));
        if (num <= 20) {
            console.log("一盒");
        } else if (num > 20) {
            let b = num / 20 + 1
            b = parseInt(b)
            console.log(`${b}盒`);
        } else {
            console.log("请输入正确的数量")
        }


    </script>
</body>

</html>